<!--{template control/admin/tpl/admin_header}--> 
 
	<div class="page_title">	
    	<h1>{$model_info['model_name']}{$_lang['manage']}</h1>
         <div class="tool">
         	<a href="index.php?do=model&model_id=4&view=list&status=0" class="here">{$_lang['task_list']}</a>
			<!--<a href="index.php?do=model&model_id=4&view=config">{$_lang['task_config']}</a>-->
		 </div>
	</div>
    <!--页头结束-->

    <!--提示结束-->
     
        <div class="box search p_relative">
    	<div class="title"><h2>{$_lang['search']}</h2></div>
        <div class="detail" id="detail">
           
		    <form action="index.php?do=model&model_id=4&view=list" method="post">
				 <input type="hidden" value="{$page}" name="page">
				<table cellspacing="0" cellpadding="0">
					<tbody>
                        <tr>
                            <th>{$_lang['task']}ID</th>
                            <td><input type="text" value="$w[task_id]" name="w[task_id]" class="txt"/></td>
                            <th>{$_lang['task_title']}</th>
                            <td><input type="text" value="$w[task_title]" name="w[task_title]" class="txt"/> {$_lang['search_by_like']}</td>
                             <th></th><td></td>
						</tr>    
                        <tr>
                            <th>{$_lang['please_choose_task_status']}</th>
                            <td>
                            	<select class="ps vm" name="w[task_status]" id="catid">
                            		<option value="">{$_lang['please_choose']}</option>
                            	{loop $task_status $k $v}
									<option value="$k" {if $w[task_status]==$k} selected="selected" {/if}>$v</option>
								{/loop}	
								</select>
								</td>
							<th>{$_lang['result_order']}</th>
							<td>
                      <select name="w[ord][]">
                           <option value="task_id" {if $w[ord][0]=='task_id' or !isset($w[ord][0])} selected="selected"{/if}>{$_lang['default']}{$_lang['order']}</option>
                           <option value="start_time" {if $w[ord][0]=='start_time' } selected="selected"{/if}>{$_lang['pub_time']}</option>
                      </select>
                      <select name="w[ord][]">
                            <option {if $w[ord][1]=='desc' or !isset($w[ord][1])}selected="selected" {/if} value="desc">{$_lang['desc']}</option>
                            <option {if $w[ord][1]=='asc'}selected="selected" {/if} value="asc">{$_lang['asc']}</option>
                      </select>
							</td>
                            <th>{$_lang['list_result']}</th>
                            <td><select name="page_size">
									<option value="10" {if $page_size=='10'}selected="selected"{/if}>{$_lang['page_size']}10</option>
									<option value="20" {if $page_size=='20'}selected="selected"{/if}>{$_lang['page_size']}20</option>
									<option value="30" {if $page_size=='30'}selected="selected"{/if}>{$_lang['page_size']}30</option>
								</select>
                              	<button class="pill" type="submit" value="{$_lang['search']}" name="sbt_search">
                            		<span class="icon magnifier">&nbsp;</span>{$_lang['search']}
								</button></td>
                        </tr>
                    </tbody>
                </table>
            </form>
			
        </div>
    </div>
    <!--搜索结束-->
    <div class="box list">
    	<div class="title"><h2>{$_lang['normal_tender']}{$_lang['task_list']}</h2></div>
        <div class="detail">
        	<form action="" id='frm_list' method="post">
        	<input type="hidden" value="{$page}" name="page">
			<input type="hidden" name="w[page_size]" value="{$page_size}">
              <div id="ajax_dom">
              <input type="hidden" value="{$page}" name="page">
              <table cellpadding="0" cellspacing="0">
                <tbody>
                  <tr>
                    <th width="8%">ID</th>
                    <th width="22%">{$_lang['task_title']}</th>
                    <th width="15%">{$_lang['task_status']}</th>
                    <th width="12%">{$_lang['pub_time']}</th>
                    <th width="20%">{$_lang['task_cash']}</th>
					<th width="8%">{$_lang['pub_name']}</th>
                    <th width="30%">{$_lang['operate']}</th>
                  </tr>
                  {loop $task_arr $k $v}
                  <tr class="item">
                 	<td class="td25"><input type="checkbox" name="ckb[]" class="checkbox" value="{$v[task_id]}" class="checkbox">{$v[task_id]}</td>
                    <td class="td28"><a href="../../index.php?do=task&task_id={$v['task_id']}" target="_blank">
                    	<!--{eval echo kekezu::cutstr($v[task_title],36)}--></a>
						{if $v[is_top]==1}<font color="red">[{$_lang['recommended']}]</font>{/if}
					</td>
                    <td>$task_status[$v[task_status]]</td>
                    <td><!--{eval echo date('Y-m-d H:i',$v[start_time])}--></td>
                    <td> {c:$cash_rule_arr[$v[task_cash_coverage]][start_cove]}-{c:$cash_rule_arr[$v[task_cash_coverage]][end_cove]}</td>
                    <td>$v[username]</td>
                    <td>
                    	{if $v[task_status]==1}
                    	<a href="index.php?do=model&model_id=$v[model_id]&view=list&task_id=$v[task_id]&ac=pass&page={$page}" class="button"><span class="check icon"></span>{$_lang['pass']}</a>
						<a href="index.php?do=model&model_id=$v[model_id]&view=list&task_id=$v[task_id]&ac=nopass&page={$page}" class="button"><span class="cross icon"></span>{$_lang['nopass']}</a>
						{/if}
						{if in_array($v[task_status],array('2','3','4','5'))}
                    	<a href="index.php?do=model&model_id=$v[model_id]&view=list&task_id=$v[task_id]&ac=freeze&page={$page}" class="button"><span class="cross icon"></span>{$_lang['freeze']}</a>
						{/if}
						{if $v[is_top]!=1 && in_array($v[task_status],array('2','3'))}
						<a href="index.php?do=model&model_id=$v[model_id]&view=list&task_id=$v[task_id]&ac=recommend&page={$page}" class="button"><span class="cog icon"></span>{$_lang['recommend']}</a>
						{/if}
						{if $v[task_status]==7}
						<a href="index.php?do=model&model_id=$v[model_id]&view=list&task_id=$v[task_id]&ac=unfreeze&page={$page}" class="button"><span class="cog icon"></span>{$_lang['cancel_freeze']}</a>
						{/if}
						{if $v[is_top]==1}
							<a href="index.php?do=model&model_id=$model_id&view=list&ac=unrecommend&task_id={$v[task_id]}&page={$page}" class="button"><span class="cog icon"></span>{$_lang['cancel_recommend']}</a>
						{/if}
						<a href="index.php?do=model&model_id=$v[model_id]&view=edit&task_id=$v[task_id]&page={$page}" class="button dbl_target"><span class="pen icon"></span>{$_lang['edit']}</a>
						{if in_array($v[task_status],array('0','10'))}
						<a href="index.php?do=model&model_id=$v[model_id]&view=list&ac=del&task_id=$v[task_id]&page=$page"  onclick="return cdel(this);" class="button"><span class="trash icon"></span>{$_lang['delete']}</a>
						{/if}
					</td>
                  </tr>
                  {/loop}
                  
                  <tr>
                    <td colspan="7">
	                    <div class="page fl_right">{$pages[page]}</div>
	                    
	                    <div class="clearfix">
	                  		<input type="checkbox" onclick="checkall();" id="checkbox" name="checkbox"/>
	                        <label for="checkbox">{$_lang['select_all']}</label>
	                            <input type="hidden" name="sbt_action" class="sbt_action"/>
	                        <button type="submit" value="{$_lang['mulit_delete']}" onclick="return batch_act(this,'frm_list');" class="pill negative" ><span class="icon trash"></span>{$_lang['mulit_delete']}</button>
	                        <button type="submit" value="{$_lang['mulit_pass']}" onclick="return batch_act(this,'frm_list');"  class="positive pill negative"><span class="icon check">&nbsp;</span>{$_lang['mulit_pass']}</button>
	                    	<button type="submit" value="{$_lang['mulit_freeze']}" onclick="return batch_act(this,'frm_list');"    class="pill negative"><span class="lock icon"></span>{$_lang['mulit_freeze']}</button>
							<button type="submit" class="positive pill negative"  onclick="return batch_act(this,'frm_list');" value="{$_lang['mulit_unfreeze']}"><span class="unlock icon"></span>{$_lang['mulit_unfreeze']}</button>
	                    </div>
                    </td>
                  </tr>
                </tbody>
              </table></div>
        	</form>
        </div>       
    </div>
	<!--主体结束-->
<!--{template control/admin/tpl/admin_footer}-->
